\hypertarget{classCanBotLL}{\section{\-Can\-Bot\-L\-L \-Class \-Reference}
\label{classCanBotLL}\index{\-Can\-Bot\-L\-L@{\-Can\-Bot\-L\-L}}
}


\hyperlink{classCanBotLL}{\-Can\-Bot\-L\-L} is the \-Low \-Level implementation on \-Can\-Bot. \-This class is responsible for the serial communication with the robot.  




{\ttfamily \#include $<$\-Can\-Bot\-L\-L.\-h$>$}

\subsection*{\-Public \-Member \-Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classCanBotLL_a3060fba49d13632f2a2d54cac98e0ddf}{\-Can\-Bot\-L\-L} ()
\item 
virtual \hyperlink{classCanBotLL_a087386b4c135c16f773663fed6eb59d2}{$\sim$\-Can\-Bot\-L\-L} ()
\item 
int \hyperlink{classCanBotLL_a24f80105dff33991e6aa24f0aace2a0b}{claw} (int open\-\_\-close)
\item 
int \hyperlink{classCanBotLL_a93694ef7809a249f10ebedfca98bbcc1}{turn} (int angle)
\item 
int \hyperlink{classCanBotLL_a5b6e2cb5ef7e052dc937abc605c090ed}{drive} (int \hyperlink{classCanBotLL_ab42fa57d0f4339ff15e2d83f9188b987}{distance})
\item 
int \hyperlink{classCanBotLL_a06c977b32a0207f009bcf71b292f4ed4}{catch\-Can} ()
\item 
int \hyperlink{classCanBotLL_ab42fa57d0f4339ff15e2d83f9188b987}{distance} ()
\item 
int \hyperlink{classCanBotLL_a60c06aee49f028b504e181c81ccf0175}{turn\-Start} (int dir)
\item 
int \hyperlink{classCanBotLL_a98be95fe221b50461a960f28117e83f9}{drive\-Start} (int dir)
\item 
int \hyperlink{classCanBotLL_a2850c2db5c516b349ce8f873ebcb9b2f}{movement\-Stop} ()
\end{DoxyCompactItemize}


\subsection{\-Detailed \-Description}
\hyperlink{classCanBotLL}{\-Can\-Bot\-L\-L} is the \-Low \-Level implementation on \-Can\-Bot. \-This class is responsible for the serial communication with the robot. 

\subsection{\-Constructor \& \-Destructor \-Documentation}
\hypertarget{classCanBotLL_a3060fba49d13632f2a2d54cac98e0ddf}{\index{\-Can\-Bot\-L\-L@{\-Can\-Bot\-L\-L}!\-Can\-Bot\-L\-L@{\-Can\-Bot\-L\-L}}
\index{\-Can\-Bot\-L\-L@{\-Can\-Bot\-L\-L}!CanBotLL@{\-Can\-Bot\-L\-L}}
\subsubsection[{\-Can\-Bot\-L\-L}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Can\-Bot\-L\-L\-::\-Can\-Bot\-L\-L} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classCanBotLL_a3060fba49d13632f2a2d54cac98e0ddf}
\hyperlink{classCanBotLL}{\-Can\-Bot\-L\-L} constructor \-This constructor initializes a serial connection. \-Next it will wait for the user to press \-S\-T\-A\-R\-T \hypertarget{classCanBotLL_a087386b4c135c16f773663fed6eb59d2}{\index{\-Can\-Bot\-L\-L@{\-Can\-Bot\-L\-L}!$\sim$\-Can\-Bot\-L\-L@{$\sim$\-Can\-Bot\-L\-L}}
\index{$\sim$\-Can\-Bot\-L\-L@{$\sim$\-Can\-Bot\-L\-L}!CanBotLL@{\-Can\-Bot\-L\-L}}
\subsubsection[{$\sim$\-Can\-Bot\-L\-L}]{\setlength{\rightskip}{0pt plus 5cm}virtual {\bf \-Can\-Bot\-L\-L\-::$\sim$\-Can\-Bot\-L\-L} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}\label{classCanBotLL_a087386b4c135c16f773663fed6eb59d2}
\hyperlink{classCanBotLL}{\-Can\-Bot\-L\-L} destructor \-It will do no more then closing the serial port 

\subsection{\-Member \-Function \-Documentation}
\hypertarget{classCanBotLL_a06c977b32a0207f009bcf71b292f4ed4}{\index{\-Can\-Bot\-L\-L@{\-Can\-Bot\-L\-L}!catch\-Can@{catch\-Can}}
\index{catch\-Can@{catch\-Can}!CanBotLL@{\-Can\-Bot\-L\-L}}
\subsubsection[{catch\-Can}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf \-Can\-Bot\-L\-L\-::catch\-Can} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classCanBotLL_a06c977b32a0207f009bcf71b292f4ed4}
function meant to catch a can

\-Before this function is called it is necessary that a can is in front of the robot \-The robot will drive till a can is between the claw, closes the claw \hypertarget{classCanBotLL_a24f80105dff33991e6aa24f0aace2a0b}{\index{\-Can\-Bot\-L\-L@{\-Can\-Bot\-L\-L}!claw@{claw}}
\index{claw@{claw}!CanBotLL@{\-Can\-Bot\-L\-L}}
\subsubsection[{claw}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf \-Can\-Bot\-L\-L\-::claw} (
\begin{DoxyParamCaption}
\item[{int}]{open\-\_\-close}
\end{DoxyParamCaption}
)}}\label{classCanBotLL_a24f80105dff33991e6aa24f0aace2a0b}
\-This function drives the robots claw 
\begin{DoxyParams}{\-Parameters}
{\em open\-\_\-close} & int which describes the movement please use \-C\-L\-A\-W\-\_\-\-O\-P\-E\-N and \-C\-L\-A\-W\-\_\-\-C\-L\-O\-S\-E (defined const) \\
\hline
\end{DoxyParams}
\hypertarget{classCanBotLL_ab42fa57d0f4339ff15e2d83f9188b987}{\index{\-Can\-Bot\-L\-L@{\-Can\-Bot\-L\-L}!distance@{distance}}
\index{distance@{distance}!CanBotLL@{\-Can\-Bot\-L\-L}}
\subsubsection[{distance}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf \-Can\-Bot\-L\-L\-::distance} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classCanBotLL_ab42fa57d0f4339ff15e2d83f9188b987}
function meant to read out the distance sensor it returns the read value \hypertarget{classCanBotLL_a5b6e2cb5ef7e052dc937abc605c090ed}{\index{\-Can\-Bot\-L\-L@{\-Can\-Bot\-L\-L}!drive@{drive}}
\index{drive@{drive}!CanBotLL@{\-Can\-Bot\-L\-L}}
\subsubsection[{drive}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf \-Can\-Bot\-L\-L\-::drive} (
\begin{DoxyParamCaption}
\item[{int}]{distance}
\end{DoxyParamCaption}
)}}\label{classCanBotLL_a5b6e2cb5ef7e052dc937abc605c090ed}
function meant to drive over a predefined distance


\begin{DoxyParams}{\-Parameters}
{\em distance} & int which describes the distance to drive (negative to drive backwards, positive to drive forward) \-This function uses an assumption for the time (us) needed to drive 1px (\-U\-S\-\_\-1\-U\-N\-I\-T\-\_\-\-H\-S) \\
\hline
\end{DoxyParams}
\hypertarget{classCanBotLL_a98be95fe221b50461a960f28117e83f9}{\index{\-Can\-Bot\-L\-L@{\-Can\-Bot\-L\-L}!drive\-Start@{drive\-Start}}
\index{drive\-Start@{drive\-Start}!CanBotLL@{\-Can\-Bot\-L\-L}}
\subsubsection[{drive\-Start}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf \-Can\-Bot\-L\-L\-::drive\-Start} (
\begin{DoxyParamCaption}
\item[{int}]{dir}
\end{DoxyParamCaption}
)}}\label{classCanBotLL_a98be95fe221b50461a960f28117e83f9}
function starts the robot driving 
\begin{DoxyParams}{\-Parameters}
{\em dir} & int which describes the direction to drive (0 to drive backwards, 1 to drive forward) it is important to call \hyperlink{classCanBotLL_a2850c2db5c516b349ce8f873ebcb9b2f}{movement\-Stop()} to stop the robots driving \\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{\-See also}
\hyperlink{classCanBotLL_a60c06aee49f028b504e181c81ccf0175}{turn\-Start(int dir)} 

\hyperlink{classCanBotLL_a2850c2db5c516b349ce8f873ebcb9b2f}{movement\-Stop()} 
\end{DoxySeeAlso}
\hypertarget{classCanBotLL_a2850c2db5c516b349ce8f873ebcb9b2f}{\index{\-Can\-Bot\-L\-L@{\-Can\-Bot\-L\-L}!movement\-Stop@{movement\-Stop}}
\index{movement\-Stop@{movement\-Stop}!CanBotLL@{\-Can\-Bot\-L\-L}}
\subsubsection[{movement\-Stop}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf \-Can\-Bot\-L\-L\-::movement\-Stop} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classCanBotLL_a2850c2db5c516b349ce8f873ebcb9b2f}
function stops the robot from moving this function is called after turn\-Start or drive\-Start \begin{DoxySeeAlso}{\-See also}
\hyperlink{classCanBotLL_a60c06aee49f028b504e181c81ccf0175}{turn\-Start(int dir)} 

\hyperlink{classCanBotLL_a98be95fe221b50461a960f28117e83f9}{drive\-Start(int dir)} 
\end{DoxySeeAlso}
\hypertarget{classCanBotLL_a93694ef7809a249f10ebedfca98bbcc1}{\index{\-Can\-Bot\-L\-L@{\-Can\-Bot\-L\-L}!turn@{turn}}
\index{turn@{turn}!CanBotLL@{\-Can\-Bot\-L\-L}}
\subsubsection[{turn}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf \-Can\-Bot\-L\-L\-::turn} (
\begin{DoxyParamCaption}
\item[{int}]{angle}
\end{DoxyParamCaption}
)}}\label{classCanBotLL_a93694ef7809a249f10ebedfca98bbcc1}
function meant to turn over a predefined angle


\begin{DoxyParams}{\-Parameters}
{\em angle} & int which describes the angle to turn (negative to turn clockwise, positive to turn counter clockwise) \-This function uses an assumption for the time (us) needed to turn 1deg (\-U\-S\-\_\-1\-D\-G\-\_\-\-H\-S) \\
\hline
\end{DoxyParams}
\hypertarget{classCanBotLL_a60c06aee49f028b504e181c81ccf0175}{\index{\-Can\-Bot\-L\-L@{\-Can\-Bot\-L\-L}!turn\-Start@{turn\-Start}}
\index{turn\-Start@{turn\-Start}!CanBotLL@{\-Can\-Bot\-L\-L}}
\subsubsection[{turn\-Start}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf \-Can\-Bot\-L\-L\-::turn\-Start} (
\begin{DoxyParamCaption}
\item[{int}]{dir}
\end{DoxyParamCaption}
)}}\label{classCanBotLL_a60c06aee49f028b504e181c81ccf0175}
function starts turning the robot 
\begin{DoxyParams}{\-Parameters}
{\em dir} & int which describes the direction to turn (0 to turn clockwise, 1 to turn counter clockwise) it is important to call \hyperlink{classCanBotLL_a2850c2db5c516b349ce8f873ebcb9b2f}{movement\-Stop()} to stop the robots turning \\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{\-See also}
\hyperlink{classCanBotLL_a98be95fe221b50461a960f28117e83f9}{drive\-Start(int dir)} 

\hyperlink{classCanBotLL_a2850c2db5c516b349ce8f873ebcb9b2f}{movement\-Stop()} 
\end{DoxySeeAlso}


\-The documentation for this class was generated from the following file\-:\begin{DoxyCompactItemize}
\item 
\-Can\-Bot\-L\-L.\-h\end{DoxyCompactItemize}
